package com.fingard.dsp.bank.reqrespobj.unifiedorder;

import java.util.HashMap;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RequestBase;

/**公众号下单，获取请求用户同意授权后的code的URL地址*/
public class ReqGenGetUserCodeURL extends RequestBase{

	/**公众账号ID*/
	public String appId = "";
	
	/**本方账号*/
	public String ownAct = "";
	
	/**商户号*/
	public String merchantId = "";
	
	/**订单UUID,用于放在state参数中，微信等平台回调时回传给收款平台*/
	public String urid;
	
	/** 用户对应用授权后得到认证码 */
	public String code;
	
	/** 授权回调地址 */
	public String authRedirectUri;

	/** 回调地址附加类型参数 */
	public String type;

    /** 普通用户的标识，对当前公众号唯一 */
    public String openid;


    public ReqGenGetUserCodeURL(HashMap<String,String> p_hashMap, ReqRespHeader p_header) throws Exception{
		reqHeader = p_header;
		if(p_hashMap.containsKey("AppId")){
			appId = p_hashMap.get("AppId");
			if(appId == null){
				appId = "";
			}
		}
		if(p_hashMap.containsKey("OurBankAccount")){
			ownAct = p_hashMap.get("OurBankAccount");
			if(ownAct == null){
				ownAct = "";
			}
		}
		if(p_hashMap.containsKey("MchId")){
			merchantId = p_hashMap.get("MchId");
			if(merchantId == null){
				merchantId = "";
			}
		}
		if(p_hashMap.containsKey("Urid")){
			urid = p_hashMap.get("Urid");
		}
		if(p_hashMap.containsKey("Code")){
			code = p_hashMap.get("Code");
		}
		if(p_hashMap.containsKey("AuthRedirectUri")){
			authRedirectUri = p_hashMap.get("AuthRedirectUri");
			if(authRedirectUri == null){
				authRedirectUri = "";
			}
		}
		if(p_hashMap.containsKey("Type")){
			type = p_hashMap.get("Type");
			if(type == null){
				type = "";
			}
		}
        if(p_hashMap.containsKey("Openid")){
            openid = p_hashMap.get("Openid");
            if(openid == null){
                openid = "";
            }
        }

	}
}
